[DllImport("kernel32.dll")]
static extern IntPtr FindResource(IntPtr hModule, IntPtr lpName,
IntPtr lpType);
[DllImport( "kernel32.dll" )]
static extern IntPtr FindResource( IntPtr hModule, int lpName, int lpType );
[DllImport( "kernel32.dll" )]
static extern IntPtr FindResource( IntPtr hModule, int lpName, string lpType );
[DllImport( "kernel32.dll" )]
static extern IntPtr FindResource( IntPtr hModule, string lpName, int lpType );
[DllImport( "kernel32.dll", SetLastError=true )]
static extern IntPtr FindResource( IntPtr hModule, string lpName, string lpType );
None.
The last 4 overrides are probably more useful than the first. They can be used without any casting.
if the function failes, you can call Marshal.GetLastWin32Error() to get the error code, and send it to the Win32Exception constructor to get the message.
Please add some!
Please add some!
Do you know one? Please contribute it!